/**
 * Created by Administrator on 2017/3/25.
 */
// articleType":1 多图 0专题
app.controller('homeCtrl',
['$scope','$location','$http','$rootScope','$routeParams', function ($scope,$location,$http,$rootScope,$routeParams) {
    // channel菜单隐藏与消失

   // $scope.navddd=["helo1","你好2",'liiuyang3','哦4',"弄好5",'哪里呢6','哪呢7','哪里呢8','哪呢9','哪呢10','哪呢11'];
    $scope.channeList=false;

    $scope.changeChanList=function () {
        if($scope.channeList){
            $scope.channeList=false;
        }else if(!$scope.channeList){
            $scope.channeList=true;

        }
    };

    //首次加载隐藏回到顶部按钮
    $(".baToTop").hide();
    ////回到顶部
    //$(".baToTop").hide();
    //$(window).on("scroll", function(){
    //    if($(window).scrollTop() >0){
    //        $(".baToTop").show();
    //    }else{
    //        $(".baToTop").hide();
    //    }
    //});
    //$scope.goBackTop=function () {
    //        $("body").animate({scrollTop: 0}, 300);
    //};


    $scope.jump = function (arg) {
        $("body").animate({scrollTop: 0}, 300);
        $location.path(arg, {cache:false}, { reload: true });
    };
    //频道列表切换
   var coluIds=$routeParams.coluId;

    if(coluIds!=undefined) {
        $scope.showAllNavs=!$scope.showAllNavs;
        console.log(lightIndex);
        $scope.chanNav(coluIds);
        //保存刷新后columId
        loadNavColu=coluIds;
    }


}]);

//app.directive('repeatFinish',function(){
//    return {
//        link: function(scope,element,attr){
//            if(scope.$last == true){
//            }
//        }
//    }
//})




